//
//  QPNavigationController.swift
//  QianPingNew
//
//  Created by Apple on 2019/5/14.
//  Copyright © 2019 Apple. All rights reserved.
//

import UIKit

class QPNavigationController: UINavigationController, UIGestureRecognizerDelegate, UINavigationControllerDelegate{

    override func viewDidLoad() {
        super.viewDidLoad()

        navigationBar.titleTextAttributes = [.foregroundColor: UIColor.black]
//        navigationBar.tintColor = UIColor(hexString: "#373737")
        navigationBar.barTintColor = .white
        
        let img = UIImage(named: "nav_back")
        UINavigationBar.appearance().backIndicatorImage = img
        UINavigationBar.appearance().backIndicatorTransitionMaskImage = img
     UIBarButtonItem.appearance().setBackButtonTitlePositionAdjustment(UIOffset(horizontal: -1000, vertical: 0), for: .default)
        
    
        navigationBar.isTranslucent = false
        self.delegate = self
        
        
    }
    deinit {

    }
    
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        
        if viewControllers.count > 0 {
            viewController.hidesBottomBarWhenPushed = true
        }
        super.pushViewController(viewController, animated: animated)
    }
}
